package com.len.controller;

import com.len.base.BaseController;
import com.len.entity.SpNotice;
import com.len.service.SpNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("notice")
public class SpNoticeController extends BaseController<SpNotice> {
    @Autowired
    private SpNoticeService spNoticeService;
    @RequestMapping("/update")
    public String update(SpNotice spNotice){
        try {
            spNoticeService.updateByPrimaryKey(spNotice);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/show")
    public String show(SpNotice spNotice){
        try {
            spNoticeService.selectByPrimaryKey(spNotice);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/save")
    public String save(SpNotice spNotice){
        try {
            spNoticeService.insert(spNotice);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
